package org.bugjail.servlet.form.create;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.bugjail.servlet.BasicUIServlet;

/**
 * Servlet implementation class for Servlet: NewProjectFormServlet
 *
 */
 public class NewProjectFormServlet extends BasicUIServlet {
		
		static final long serialVersionUID = 1L;
		
		@Override
		protected void write(HttpServletRequest request,
				HttpServletResponse response) throws ServletException, IOException {
			
			PrintWriter pw = response.getWriter();		

			pw.println("<form>");
			
			pw.println("Project name:<br><input type='text' maxlength='50' /><br>");
			pw.println("Project description:<br><textarea></textarea><br>");			
			pw.println("<input type=submit value='Create' />");
			pw.println("&nbsp;<a href='ProjectServlet'>Cancel</a>");
			pw.println("</form>");
		}

		@Override
		protected String pageTitle() {
			return "Create new project";
		}

		@Override
		protected void beforeAction(HttpServletRequest request,
				HttpServletResponse response) throws ServletException, IOException {
			
		}

	}
